﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace DACU.Tools.Converters
{
	class BoolToOnOffConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			return (bool) value ? "On" : "Off";
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			return (value as string) == "On";
		}
	}
}
